<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>编辑产品</title>
    <link rel="stylesheet" href="/static/css/editproduct.css">
</head>
<body>
    <div class="admin-container">
        <h1>编辑产品</h1>
            <form action="{{ url_for('edit_product', id=product['id']) }}" method="post" enctype="multipart/form-data">
                <input type="text" name="name" value="{{ product['name'] }}" required>
                <textarea name="description" required>{{ product['description'] }}</textarea>
                <input type="text" name="price" value="{{ product['price'] }}" required>
                <input type="number" name="stock" value="{{ product['stock'] }}" required>

                <select name="category" required>
                       <option value="" disabled selected>选择分类</option>
                            <option value="电子产品">电子产品</option>
                            <option value="书籍">书籍</option>
                            <option value="服装">服装</option>
                            <option value="家具">家具</option>
                            <option value="玩具">玩具</option>
                            <option value="杂货">杂货</option>
                            <option value="体育用品">体育用品</option>
                            <option value="健康与美容">健康与美容</option>
                            <option value="珠宝">珠宝</option>
                            <option value="园艺">园艺</option>
                            <option value="宠物用品">宠物用品</option>
                            <option value="鞋类">鞋类</option>
                            <option value="汽车用品">汽车用品</option>
                </select>
                <input type="file" name="image">
                <button type="submit">更新产品</button>
            </form>

    </div>
</body>
</html>
